package com.miracle9.game.dao;

import com.miracle9.game.entity.BulletFishHallInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class BulletFishHallInfoDao extends SqlOperating<BulletFishHallInfo, Integer> {

    public List<BulletFishHallInfo> getList() {
        return q_CreateSqlList("from BulletFishHallInfo order by hallId", new Object[0]);
    }

    public void update(List<BulletFishHallInfo> list) {
        for (BulletFishHallInfo hallInfo : list) {
            q_Update("update BulletFishHallInfo set minGold=? where hallId=?", new Object[]{hallInfo.getMinGold(), hallInfo.getHallId()});
        }
    }

}